package com.tiendung.otalunch;

import java.util.Calendar;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class TheTabWidget extends TabActivity {
	  

	public static int mDay;
	public static int mMonth;
	public static int mYear;
	public static boolean isUsingLocation;
	
	public static String serverIP = "127.0.0.1:80";
				
	public void onCreate(Bundle savedInstanceState) {  
		Resources res = getResources();
		serverIP = res.getString(R.string.serverIP);
		
		super.onCreate(savedInstanceState);    
		setContentView(R.layout.main);    
		
		Calendar currentDate = Calendar.getInstance();
        mDay = currentDate.get(Calendar.DAY_OF_MONTH);
        mMonth = currentDate.get(Calendar.MONTH);
        mYear = currentDate.get(Calendar.YEAR); 
        isUsingLocation = false;
                   
		TabHost tabHost = getTabHost();    
		TabHost.TabSpec spec;     
		Intent intent;   
		
		// Create an Intent to launch an Activity for the tab (to be reused)    
		intent = new Intent().setClass(this, Today.class);    
		
		// Initialize a TabSpec for each tab and add it to the TabHost    
		spec = tabHost.newTabSpec("Today").setIndicator("Today", 
				res.getDrawable(R.drawable.ic_tab_today))                  
					.setContent(intent);    
		tabHost.addTab(spec);    
		
		// Do the same for the other tabs    
		intent = new Intent().setClass(this, Tomorrow.class);
		
		spec = tabHost.newTabSpec("Tomorrow").setIndicator("Tomorrow",                      
				res.getDrawable(R.drawable.ic_tab_tomorrow))                  
					.setContent(intent);		
		tabHost.addTab(spec);    
				
		// the first open tab will be the HelloWorld
		tabHost.setCurrentTab(0);
	}
}